package com.xbongbong.pro.rabbitmq.feign;

import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.connector.pojo.dto.ConnectorHistoryDataInitDTO;
import com.xbongbong.pro.connector.pojo.dto.ConnectorRabbitMqDTO;
import com.xbongbong.pro.connector.pojo.vo.ConnectorRabbitMqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 连接器 feign
 * 创建时间 2020/12/28 2:47 PM
 * 修改时间 2020/12/28 2:47 PM
 * @author chy
 */
@FeignClient(name = "pro-connection",contextId = "connectorFeignClient")
public interface ConnectorFeignClient {

    /**
     *
     * @param connectorRabbitMqDTO
     * @param lang
     * @return
     * 创建时间 2020/12/28 2:49 PM
     * 修改时间 2020/12/28 2:49 PM
     * @author chy
     */
    @RequestMapping(value = "/pro/v1/connection/connector/triggerSend", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<ConnectorRabbitMqVO> triggerSend(@RequestBody ConnectorRabbitMqDTO connectorRabbitMqDTO, @RequestParam("lang") String lang);

    /**
     *
     * @param connectorHistoryDataInitDTO
     * @param lang
     * @return
     * 创建时间 2020/12/28 2:49 PM
     * 修改时间 2020/12/28 2:49 PM
     * @author chy
     */
    @RequestMapping(value = "/pro/v1/connection/connector/historyDataInit", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<ConnectorRabbitMqVO> historyDataInit(@RequestBody ConnectorHistoryDataInitDTO connectorHistoryDataInitDTO, @RequestParam("lang") String lang);
}
